package oj;

import java.util.Scanner;

public class Day3F {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=null;
        int maxLen = 0;//最长的连续字符串长度
        int count = 0;//连续数字的个数
        int end = 0;
        while (sc.hasNext()) {
            s = sc.nextLine();
            char[] arr = s.toCharArray();
            for (int i = 0; i < arr.length; i++) {
                if (arr[i] >='0' && arr[i] <='9') {
                    count++;
                    if (count > maxLen) {
                        end = i;
                        maxLen = count;
                    }
                } else {
                    count = 0;
                }
            }
        }
        System.out.println(s.substring(end-maxLen+1,end+1));
    }
}
